import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)


// Element 使用
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
app.use(ElementPlus)

// 路由router使用
import router from './router/router'
app.use(router)

// element图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//Pinia
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persist'
const pinia = createPinia()
//pinia数据持久化
pinia.use(piniaPersist)


app.use(pinia)
app.mount('#app')
